package com.tyk.bookstore.front.payment.util;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tyk.bookstore.front.payment.model.entity.AmountLogDo;
import com.tyk.bookstore.front.payment.model.entity.PaymentRecordDo;
import com.tyk.bookstore.front.payment.model.query.PayCallbackQuery;
import com.tyk.bookstore.front.payment.model.vo.AmountLogPageVo;
import com.tyk.bookstore.front.payment.model.vo.AmountLogVo;
import com.tyk.bookstore.front.payment.model.vo.PaymentRecordPageVo;
import com.tyk.bookstore.front.payment.model.vo.PaymentRecordVo;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

@Mapper(componentModel = "spring")
public interface MapStructPayment {

    PaymentRecordVo toPaymentRecordVo(PaymentRecordDo paymentRecord);

    PaymentRecordPageVo toPaymentRecordPageVo(Page<PaymentRecordDo> page);


    PaymentRecordDo toPaymentRecordDo(PayCallbackQuery query);

    AmountLogVo toAmountLogVo(AmountLogDo amountLog);

    @Mapping(target = "records", ignore = true)
    AmountLogPageVo toAmountLogPageVo(Page<AmountLogDo> page);

    AmountLogPageVo.AmountLog toAmountLogPageVo$AmountLog(AmountLogDo amountLogDo);
}
